Skip to content

Add v1 holdings summary endpoint without holding fees#5030

Open
samsondav wants to merge 7 commits intohyperledger-labs:mainfrom
Avro-Digital:worktree-issue-4094-drop-holding-fees
Open

Add v1 holdings summary endpoint without holding fees#5030
samsondav wants to merge 7 commits intohyperledger-labs:mainfrom
Avro-Digital:worktree-issue-4094-drop-holding-fees

Conversation

@samsondav
Copy link
Copy Markdown

@samsondav samsondav commented Apr 14, 2026

Summary

  • Introduces /v1/holdings/summary scan endpoint that drops all holding fee fields (accumulated_holding_fees_unlocked, accumulated_holding_fees_locked, accumulated_holding_fees_total, total_available_coin) and the as_of_round request parameter, as these don't express meaningful aggregate values
  • Deprecates /v0/holdings/summary
  • Adds corresponding v1 endpoint to the validator scan-proxy

Closes #4094

Test plan

  • Verify apps-scan/compile, apps-validator/compile, apps-app/compile, and apps-app/Test/compile all pass
  • New assertions in ScanTimeBasedIntegrationTest verify v1 response contains correct coin totals matching v0 and handles atOrBefore record time matching — executed in CI
  • Verify v0 endpoint still works unchanged (backwards compatible) — v0 handler code preserved, only deprecation metadata added
  • Verify v1 response schema has only party_id, total_unlocked_coin, total_locked_coin, total_coin_holdings per summary entry — confirmed from Guardrail-generated HoldingsSummaryV1 case class

…bs#4094)

The holding fees in the scan summary endpoint don't express a meaningful
aggregate value, and total_available_coin deducting holding fees is
incorrect. Introduce /v1/holdings/summary that drops all holding fee
fields and the as_of_round parameter, keeping only party_id,
total_unlocked_coin, total_locked_coin, and total_coin_holdings.
Deprecate /v0/holdings/summary.

Signed-off-by: Sam Davies <samsondav@protonmail.com>
- Add `deprecated: true` to /v0/holdings/summary per project convention
- Fix v1 description to reference /v0/holdings/state (not non-existent /v1)
- Add validator scan-proxy v1 holdings summary test

Signed-off-by: Sam Davies <samsondav@protonmail.com>
@samsondav samsondav force-pushed the worktree-issue-4094-drop-holding-fees branch from 47bb5b1 to cad5b1b Compare April 14, 2026 15:21
- Add `deprecated: true` and `tags: [deprecated]` to
  /v0/scan-proxy/holdings/summary for consistency with scan.yaml
- Add non-zero assertion on v1 totalCoinHoldings to catch
  all-zeros bugs

Signed-off-by: Sam Davies <samsondav@protonmail.com>
… query

- Store-level: verify coin totals are round-independent at asOfRound=0
  and fee fields go negative (documenting v1 endpoint behavior)
- Store-level: verify empty summaries for party with no holdings
- Integration: multi-party v1 query with alice+bob, assert alice
  results match single-party query

Signed-off-by: Sam Davies <samsondav@protonmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Revisit holding fees in scan summary endpoint

5 participants